<template>
  <div class="app-container calendar-list-container">
    <div class="filter-container">
      <el-input v-model="listQuery.name" style="width: 200px;" class="filter-item" placeholder="请输入消防设施名称" @keyup.enter.native="handleFilter"/>
      <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="handleFilter">{{ $t('table.search') }}</el-button>
    </div>
    <div class="fontColor">
      <el-tabs type="border-card">
        <el-tab-pane label="所有设施">
          <AssetList/>
        </el-tab-pane>
        <el-tab-pane label="监控设施">
          <AssignmentList/>
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script>
import AssignmentList from '@/views/fire/asset/facility/assignmentlist'
import AssetList from '@/views/fire/asset/facility/assetlist'
import waves from '@/directive/waves' // 水波纹指令

export default {
  name: 'AssetIndex',
  directives: {
    waves
  },
  components: {
    AssignmentList,
    AssetList
  },
  filters: {
    statusFilter(status) {
      const statusMap = {
        published: 'success',
        draft: 'info',
        deleted: 'danger'
      }
      return statusMap[status]
    }
  },
  data() {
    return {
      tableKey: 0,
      total: null,
      listLoading: true,
      listQuery: {
        page: 1,
        pasesize: 10,
        name: ''
      },
      showReviewer: false,
      pvData: [],
      btn_query: false
    }
  },
  created() {

  },
  methods: {
    handleModifyStatus(row, status) {
      this.$message({
        message: '操作成功',
        type: 'success'
      })
      row.status = status
    }
  }
}
</script>
